package p.ithorns.integration.hazelcast.mqtt;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonTypeName;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @Author: liuhaitao
 * @Date: 2022/8/22 9:39
 * @Description: 心跳
 */
@Getter
@Setter
@JsonTypeName(value = "HEARTBEAT")
@NoArgsConstructor
public class HeartbeatUp implements BaseRaw {

    /**
     * 网关ID
     */
    @JsonProperty("gw_id")
    private String gwId;

    /**
     * 心跳状态
     */
    @JsonProperty("heart_beat")
    private int heartBeat;

    @Override
    public String toString() {
        return "{" +
                "gwId:" + gwId +
                ", heartBeat:" + heartBeat +
                "}";
    }

    @Override
    public String getId() {
        return gwId;
    }

}
